Optimal. Leaf size=76 \[ \frac {3 a x}{8}+\frac {b \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {b \sin ^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {3872, 2715, 8,
2713} \begin {gather*} \frac {a \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3 a x}{8}-\frac {b \sin ^3(c+d x)}{3 d}+\frac {b \sin (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 3872
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+b \sec (c+d x)) \, dx &=a \int \cos ^4(c+d x) \, dx+b \int \cos ^3(c+d x) \, dx\\ &=\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {1}{4} (3 a) \int \cos ^2(c+d x) \, dx-\frac {b \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=\frac {b \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {b \sin ^3(c+d x)}{3 d}+\frac {1}{8} (3 a) \int 1 \, dx\\ &=\frac {3 a x}{8}+\frac {b \sin (c+d x)}{d}+\frac {3 a \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a \cos ^3(c+d x) \sin (c+d x)}{4 d}-\frac {b \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 73, normalized size = 0.96 \begin {gather*} \frac {3 a (c+d x)}{8 d}+\frac {b \sin (c+d x)}{d}-\frac {b \sin ^3(c+d x)}{3 d}+\frac {a \sin (2 (c+d x))}{4 d}+\frac {a \sin (4 (c+d x))}{32 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 60, normalized size = 0.79
method | result | size |
derivativedivides | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(60\) |
default | \(\frac {a \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {b \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(60\) |
risch | \(\frac {3 a x}{8}+\frac {3 b \sin \left (d x +c \right )}{4 d}+\frac {a \sin \left (4 d x +4 c \right )}{32 d}+\frac {b \sin \left (3 d x +3 c \right )}{12 d}+\frac {a \sin \left (2 d x +2 c \right )}{4 d}\) | \(63\) |
norman | \(\frac {\frac {3 a x}{8}+\frac {3 a x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {9 a x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4}+\frac {3 a x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2}+\frac {3 a x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8}-\frac {\left (5 a -8 b \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d}+\frac {\left (5 a +8 b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {\left (9 a -40 b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {\left (9 a +40 b \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}\) | \(172\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 57, normalized size = 0.75 \begin {gather*} \frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a - 32 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} b}{96 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.00, size = 53, normalized size = 0.70 \begin {gather*} \frac {9 \, a d x + {\left (6 \, a \cos \left (d x + c\right )^{3} + 8 \, b \cos \left (d x + c\right )^{2} + 9 \, a \cos \left (d x + c\right ) + 16 \, b\right )} \sin \left (d x + c\right )}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sec {\left (c + d x \right )}\right ) \cos ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 140 vs.
\(2 (68) = 136\).
time = 0.44, size = 140, normalized size = 1.84 \begin {gather*} \frac {9 \, {\left (d x + c\right )} a - \frac {2 \, {\left (15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 40 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 40 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.83, size = 75, normalized size = 0.99 \begin {gather*} \frac {3\,a\,x}{8}+\frac {2\,b\,\sin \left (c+d\,x\right )}{3\,d}+\frac {3\,a\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{8\,d}+\frac {a\,{\cos \left (c+d\,x\right )}^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {b\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________